package com.glsc.ngateway.flowable.amqp;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author lium
 * @date 2021/09/24
 * mq 发送
 */
@Component
public class MessageSender {
    private static final Logger logger = LoggerFactory.getLogger(MessageSender.class);

    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void sendMessage(String exchange, String routingKey, String context) {


    }

    public void sendMessage(String context) {
        logger.info("flowable.queue.tasknotify send:" + context);
        this.rabbitTemplate.convertAndSend(InitQueue.EXCHANGE_CHECKGW, InitQueue.ROUTING_KEY_CHECKGW, context);
    }


}
